/*
 * Copyright (c) JoinQuant Development Team
 * Author: Huayong Kuang <kuanghuayong@joinquant.com>
 */

#include <cstring>
#include <iostream>

using namespace std;



int main(void)
{
    char str[80] = "Hi, hello - world - !";
	const char s[4] = " ,-";
	char *token;

	// 获取第一个子字符串
	token = strtok(str, s);

	// 继续获取其他的子字符串
	while (token != NULL) {
		printf("%s\n", token);
		token = strtok(NULL, s);
	}

    printf("%s\n", str);

    return 0;
}

